<?php $this->load->view('common/cms-head'); ?>
<article id="content">
    <div class="pgwrapper">
    <div class="w960 bg1 p15 bx_shw">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
  <td width="20%" style="border-right:2px solid #e5e5e5;" valign="top">
    <?php $this->load->view('enterprises/leftnavCMS'); ?>
  </td>
  <td width="80%" valign="top" style="padding:5px;">
  <form id="bannerform">
  <table width="100%" border="0" cellpadding="5" cellspacing="0" style="padding: 0px 30px;">
                    <tr>
						<td class="txt-blck"><strong>Select Store:</strong></td>
						<td><select id="banner_store" name="banner_store"
							onchange="getStoreBanners(this.value);">
							<?php foreach ($allStoresArray as $temp){ ?>
								<option <?php if($temp['store_id']==$storeId){ echo "selected"; } ?> value="<?php echo $temp['store_id']; ?>">
								<?php echo $temp['store_name']; ?>
								</option>
								<?php } ?>
						</select>
                        </td>
					</tr>
  </table>
  </form>
  <table width="100%" border="1" cellpadding="5" cellspacing="0">
  <tr style="background-color:#f2f2f2;">
    <td class="txt-blck"><strong>Banner Alt</strong></td>
    <td class="txt-blck" nowrap="nowrap"><strong>Banner Status</strong></td>
    <td></td>
  </tr>
  <?php foreach ($bannerArray as $banners){?>
  <tr>
    <td class="txt-blck" width="60%"><?php echo $banners['banner_alt'];?></td>
    <td class="txt-blck" width="20%" align="center"><?php echo $banners['banner_status'];?></td>
    <td width="20%" align="center"><a href="/editBanner/<?php echo $banners['banner_id'];?>" class="link1">Edit</a></td>
  </tr>
  <?php } ?>
</table>
  </td>
</tr>
</table>
</div>
</div>
</article>
<div class="clr-both spacer-10">&nbsp;</div>
<?php $this->load->view('common/cms-footer'); ?>
<script>
function getStoreBanners(a) {
	document.forms.bannerform.action = "/viewBanners/" + a;
	document.forms.bannerform.submit()
}
</script>